package com.core.shared;

import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created with IntelliJ IDEA.
 * User: xianfei
 * Date: 2016-01-14
 * Time: 13:59
 * To change this template use Editor | File and Code Templates.
 */
public class ThreadTest {

    public static void main(String[] args) {
//        ExecutorService fixedThreadPool = Executors.newFixedThreadPool(2);
//        for (int i = 0; i < 10; i++) {
//            final int index = i;
//            fixedThreadPool.execute(new Runnable() {
//                @Override
//                public void run() {
//                    System.out.println(index);
//                    try {
//                        Thread.sleep(500);
//                    } catch (InterruptedException e) {
//                        e.printStackTrace();
//                    }
//                }
//            });
//        }

        m1();

    }

    public static void m1() {
        String str = "http://multi.live800.com/live800/preview.jsp";
        System.out.println(str.length());
//        str = str.trim();
//        System.out.println(str);
    }

    public static void m2(File file) {
        File[] f = file.listFiles();
        for (int i = 0; i < f.length; i++) {
            if (f[i].isFile()) {
                System.out.println(f[i].getName());
            } else {
                m2(f[i]);
            }
        }
    }

}
